<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>opennars: aruntime/src/main/java/nars/inference/TruthFunctions.java Source File</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../navtreedata.js"></script>
<script type="text/javascript" src="../../navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">opennars
   &#160;<span id="projectnumber">1.5.5</span>
   </div>
   <div id="projectbrief">1.5-ish</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="../../index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="../../pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="../../namespaces.html"><span>Packages</span></a></li>
      <li><a href="../../annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="../../files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="../../search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="../../search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="../../files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('df/d29/TruthFunctions_8java_source.html','../../');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">TruthFunctions.java</div>  </div>
</div><!--header-->
<div class="contents">
<a href="../../df/d29/TruthFunctions_8java.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * TruthFunctions.java</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * Copyright (C) 2008  Pei Wang</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> * This file is part of Open-NARS.</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> * Open-NARS is free software; you can redistribute it and/or modify</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> * it under the terms of the GNU General Public License as published by</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> * the Free Software Foundation, either version 2 of the License, or</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> * (at your option) any later version.</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"> * Open-NARS is distributed in the hope that it will be useful,</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment"> * but WITHOUT ANY WARRANTY; without even the abduction warranty of</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment"> * GNU General Public License for more details.</span></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment"> * You should have received a copy of the GNU General Public License</span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment"> * along with Open-NARS.  If not, see &lt;http://www.gnu.org/licenses/&gt;.</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="keyword">package </span>nars.inference;</div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;</div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="keyword">import</span> <a class="code" href="../../d7/d81/namespacenars.html">nars</a>.<a class="code" href="../../db/dec/namespacenars_1_1entity.html">entity</a>.*;</div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;</div>
<div class="line"><a name="l00028"></a><span class="lineno"><a class="line" href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions.html">   28</a></span>&#160;<span class="keyword">public</span> <span class="keyword">final</span> <span class="keyword">class </span><a class="code" href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions.html">TruthFunctions</a> <span class="keyword">extends</span> <a class="code" href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions.html">UtilityFunctions</a> {</div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;</div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;    <span class="comment">/* ----- Single argument functions, called in MatchingRules ----- */</span></div>
<div class="line"><a name="l00038"></a><span class="lineno"><a class="line" href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_a3a5a75db35145955b00958489a5ce50d.html#a3a5a75db35145955b00958489a5ce50d">   38</a></span>&#160;    <span class="keyword">static</span> <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> <a class="code" href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_a3a5a75db35145955b00958489a5ce50d.html#a3a5a75db35145955b00958489a5ce50d">conversion</a>(<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> v1) {</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;        <span class="keywordtype">float</span> f1 = v1.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a9eac33f2495441c77911a8581a5bbe61.html#a9eac33f2495441c77911a8581a5bbe61">getFrequency</a>();</div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;        <span class="keywordtype">float</span> c1 = v1.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a68ca7d92e9ea20d2a9a9f578ad7b681c.html#a68ca7d92e9ea20d2a9a9f578ad7b681c">getConfidence</a>();</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;        <span class="keywordtype">float</span> w = <a class="code" href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a35ac262407303cdf8d11f7892f9a3a03.html#a35ac262407303cdf8d11f7892f9a3a03">and</a>(f1, c1);</div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;        <span class="keywordtype">float</span> c = <a class="code" href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a957a91e3b91d4a4043c3959838c370f2.html#a957a91e3b91d4a4043c3959838c370f2">w2c</a>(w);</div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a>(1, c);</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;    }</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;    <span class="comment">/* ----- Single argument functions, called in StructuralRules ----- */</span></div>
<div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_ace28b3a18d275b33d2a094189842b2ed.html#ace28b3a18d275b33d2a094189842b2ed">   54</a></span>&#160;    <span class="keyword">static</span> <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> <a class="code" href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_ace28b3a18d275b33d2a094189842b2ed.html#ace28b3a18d275b33d2a094189842b2ed">negation</a>(<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> v1) {</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;        <span class="keywordtype">float</span> f = 1 - v1.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a9eac33f2495441c77911a8581a5bbe61.html#a9eac33f2495441c77911a8581a5bbe61">getFrequency</a>();</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;        <span class="keywordtype">float</span> c = v1.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a68ca7d92e9ea20d2a9a9f578ad7b681c.html#a68ca7d92e9ea20d2a9a9f578ad7b681c">getConfidence</a>();</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a>(f, c);</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;    }</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;</div>
<div class="line"><a name="l00067"></a><span class="lineno"><a class="line" href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_a8a24dac0bee6fb26bdf7de4517abe66c.html#a8a24dac0bee6fb26bdf7de4517abe66c">   67</a></span>&#160;    <span class="keyword">static</span> <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> <a class="code" href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_a8a24dac0bee6fb26bdf7de4517abe66c.html#a8a24dac0bee6fb26bdf7de4517abe66c">contraposition</a>(<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> v1) {</div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;        <span class="keywordtype">float</span> f1 = v1.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a9eac33f2495441c77911a8581a5bbe61.html#a9eac33f2495441c77911a8581a5bbe61">getFrequency</a>();</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;        <span class="keywordtype">float</span> c1 = v1.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a68ca7d92e9ea20d2a9a9f578ad7b681c.html#a68ca7d92e9ea20d2a9a9f578ad7b681c">getConfidence</a>();</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;        <span class="keywordtype">float</span> w = <a class="code" href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a35ac262407303cdf8d11f7892f9a3a03.html#a35ac262407303cdf8d11f7892f9a3a03">and</a>(1 - f1, c1);</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;        <span class="keywordtype">float</span> c = <a class="code" href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a957a91e3b91d4a4043c3959838c370f2.html#a957a91e3b91d4a4043c3959838c370f2">w2c</a>(w);</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a>(0, c);</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;    }</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;    <span class="comment">/* ----- double argument functions, called in MatchingRules ----- */</span></div>
<div class="line"><a name="l00085"></a><span class="lineno"><a class="line" href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_a22620614c797410623291399bae01a0b.html#a22620614c797410623291399bae01a0b">   85</a></span>&#160;    <span class="keyword">static</span> <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> <a class="code" href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_a22620614c797410623291399bae01a0b.html#a22620614c797410623291399bae01a0b">revision</a>(<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> v1, <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> v2) {</div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;        <span class="keywordtype">float</span> f1 = v1.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a9eac33f2495441c77911a8581a5bbe61.html#a9eac33f2495441c77911a8581a5bbe61">getFrequency</a>();</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;        <span class="keywordtype">float</span> f2 = v2.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a9eac33f2495441c77911a8581a5bbe61.html#a9eac33f2495441c77911a8581a5bbe61">getFrequency</a>();</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;        <span class="keywordtype">float</span> c1 = v1.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a68ca7d92e9ea20d2a9a9f578ad7b681c.html#a68ca7d92e9ea20d2a9a9f578ad7b681c">getConfidence</a>();</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;        <span class="keywordtype">float</span> c2 = v2.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a68ca7d92e9ea20d2a9a9f578ad7b681c.html#a68ca7d92e9ea20d2a9a9f578ad7b681c">getConfidence</a>();</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;        <span class="keywordtype">float</span> w1 = <a class="code" href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a2020576689d5aebb96d6915150cc7b9d.html#a2020576689d5aebb96d6915150cc7b9d">c2w</a>(c1);</div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;        <span class="keywordtype">float</span> w2 = <a class="code" href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a2020576689d5aebb96d6915150cc7b9d.html#a2020576689d5aebb96d6915150cc7b9d">c2w</a>(c2);</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;        <span class="keywordtype">float</span> w = w1 + w2;</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;        <span class="keywordtype">float</span> f = (w1 * f1 + w2 * f2) / w;</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;        <span class="keywordtype">float</span> c = <a class="code" href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a957a91e3b91d4a4043c3959838c370f2.html#a957a91e3b91d4a4043c3959838c370f2">w2c</a>(w);</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a>(f, c);</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;    }</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;    <span class="comment">/* ----- double argument functions, called in SyllogisticRules ----- */</span></div>
<div class="line"><a name="l00108"></a><span class="lineno"><a class="line" href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_af0cd0f846c8a7e500840b517ab006b94.html#af0cd0f846c8a7e500840b517ab006b94">  108</a></span>&#160;    <span class="keyword">static</span> <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> <a class="code" href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_af0cd0f846c8a7e500840b517ab006b94.html#af0cd0f846c8a7e500840b517ab006b94">deduction</a>(<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> v1, <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> v2) {</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;        <span class="keywordtype">float</span> f1 = v1.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a9eac33f2495441c77911a8581a5bbe61.html#a9eac33f2495441c77911a8581a5bbe61">getFrequency</a>();</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;        <span class="keywordtype">float</span> f2 = v2.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a9eac33f2495441c77911a8581a5bbe61.html#a9eac33f2495441c77911a8581a5bbe61">getFrequency</a>();</div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;        <span class="keywordtype">float</span> c1 = v1.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a68ca7d92e9ea20d2a9a9f578ad7b681c.html#a68ca7d92e9ea20d2a9a9f578ad7b681c">getConfidence</a>();</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;        <span class="keywordtype">float</span> c2 = v2.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a68ca7d92e9ea20d2a9a9f578ad7b681c.html#a68ca7d92e9ea20d2a9a9f578ad7b681c">getConfidence</a>();</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;        <span class="keywordtype">float</span> f = <a class="code" href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a35ac262407303cdf8d11f7892f9a3a03.html#a35ac262407303cdf8d11f7892f9a3a03">and</a>(f1, f2);</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;        <span class="keywordtype">float</span> c = <a class="code" href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a35ac262407303cdf8d11f7892f9a3a03.html#a35ac262407303cdf8d11f7892f9a3a03">and</a>(c1, c2, f);</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a>(f, c);</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;    }</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;</div>
<div class="line"><a name="l00127"></a><span class="lineno"><a class="line" href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_a36d2256df8aa616ab1ac7519a60312c8.html#a36d2256df8aa616ab1ac7519a60312c8">  127</a></span>&#160;    <span class="keyword">static</span> <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> <a class="code" href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_a36d2256df8aa616ab1ac7519a60312c8.html#a36d2256df8aa616ab1ac7519a60312c8">deduction</a>(<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> v1, <span class="keywordtype">float</span> reliance) {</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;        <span class="keywordtype">float</span> f1 = v1.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a9eac33f2495441c77911a8581a5bbe61.html#a9eac33f2495441c77911a8581a5bbe61">getFrequency</a>();</div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;        <span class="keywordtype">float</span> c1 = v1.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a68ca7d92e9ea20d2a9a9f578ad7b681c.html#a68ca7d92e9ea20d2a9a9f578ad7b681c">getConfidence</a>();</div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;        <span class="keywordtype">float</span> c = <a class="code" href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a35ac262407303cdf8d11f7892f9a3a03.html#a35ac262407303cdf8d11f7892f9a3a03">and</a>(f1, c1, reliance);</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a>(f1, c);</div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;    }</div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;</div>
<div class="line"><a name="l00143"></a><span class="lineno"><a class="line" href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_a93ca820557fc8d18ef741bd33501126f.html#a93ca820557fc8d18ef741bd33501126f">  143</a></span>&#160;    <span class="keyword">static</span> <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> <a class="code" href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_a93ca820557fc8d18ef741bd33501126f.html#a93ca820557fc8d18ef741bd33501126f">analogy</a>(<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> v1, <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> v2) {</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;        <span class="keywordtype">float</span> f1 = v1.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a9eac33f2495441c77911a8581a5bbe61.html#a9eac33f2495441c77911a8581a5bbe61">getFrequency</a>();</div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;        <span class="keywordtype">float</span> f2 = v2.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a9eac33f2495441c77911a8581a5bbe61.html#a9eac33f2495441c77911a8581a5bbe61">getFrequency</a>();</div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;        <span class="keywordtype">float</span> c1 = v1.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a68ca7d92e9ea20d2a9a9f578ad7b681c.html#a68ca7d92e9ea20d2a9a9f578ad7b681c">getConfidence</a>();</div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;        <span class="keywordtype">float</span> c2 = v2.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a68ca7d92e9ea20d2a9a9f578ad7b681c.html#a68ca7d92e9ea20d2a9a9f578ad7b681c">getConfidence</a>();</div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;        <span class="keywordtype">float</span> f = <a class="code" href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a35ac262407303cdf8d11f7892f9a3a03.html#a35ac262407303cdf8d11f7892f9a3a03">and</a>(f1, f2);</div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;        <span class="keywordtype">float</span> c = <a class="code" href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a35ac262407303cdf8d11f7892f9a3a03.html#a35ac262407303cdf8d11f7892f9a3a03">and</a>(c1, c2, f2);</div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a>(f, c);</div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;    }</div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;</div>
<div class="line"><a name="l00162"></a><span class="lineno"><a class="line" href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_a6c1cb2626ef3303a17b5bc84c9da732f.html#a6c1cb2626ef3303a17b5bc84c9da732f">  162</a></span>&#160;    <span class="keyword">static</span> <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> <a class="code" href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_a6c1cb2626ef3303a17b5bc84c9da732f.html#a6c1cb2626ef3303a17b5bc84c9da732f">resemblance</a>(<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> v1, <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> v2) {</div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;        <span class="keywordtype">float</span> f1 = v1.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a9eac33f2495441c77911a8581a5bbe61.html#a9eac33f2495441c77911a8581a5bbe61">getFrequency</a>();</div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;        <span class="keywordtype">float</span> f2 = v2.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a9eac33f2495441c77911a8581a5bbe61.html#a9eac33f2495441c77911a8581a5bbe61">getFrequency</a>();</div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;        <span class="keywordtype">float</span> c1 = v1.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a68ca7d92e9ea20d2a9a9f578ad7b681c.html#a68ca7d92e9ea20d2a9a9f578ad7b681c">getConfidence</a>();</div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;        <span class="keywordtype">float</span> c2 = v2.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a68ca7d92e9ea20d2a9a9f578ad7b681c.html#a68ca7d92e9ea20d2a9a9f578ad7b681c">getConfidence</a>();</div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;        <span class="keywordtype">float</span> f = <a class="code" href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a35ac262407303cdf8d11f7892f9a3a03.html#a35ac262407303cdf8d11f7892f9a3a03">and</a>(f1, f2);</div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;        <span class="keywordtype">float</span> c = <a class="code" href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a35ac262407303cdf8d11f7892f9a3a03.html#a35ac262407303cdf8d11f7892f9a3a03">and</a>(c1, c2, <a class="code" href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a24093a77b49f21322e62c9bed7ff5ee2.html#a24093a77b49f21322e62c9bed7ff5ee2">or</a>(f1, f2));</div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a>(f, c);</div>
<div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;    }</div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;</div>
<div class="line"><a name="l00183"></a><span class="lineno"><a class="line" href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_ab001ba72b5926188d21dd48a5eaaeb8b.html#ab001ba72b5926188d21dd48a5eaaeb8b">  183</a></span>&#160;    <span class="keyword">static</span> <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> <a class="code" href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_ab001ba72b5926188d21dd48a5eaaeb8b.html#ab001ba72b5926188d21dd48a5eaaeb8b">abduction</a>(<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> v1, <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> v2) {</div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;        <span class="keywordtype">float</span> f1 = v1.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a9eac33f2495441c77911a8581a5bbe61.html#a9eac33f2495441c77911a8581a5bbe61">getFrequency</a>();</div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;        <span class="keywordtype">float</span> f2 = v2.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a9eac33f2495441c77911a8581a5bbe61.html#a9eac33f2495441c77911a8581a5bbe61">getFrequency</a>();</div>
<div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;        <span class="keywordtype">float</span> c1 = v1.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a68ca7d92e9ea20d2a9a9f578ad7b681c.html#a68ca7d92e9ea20d2a9a9f578ad7b681c">getConfidence</a>();</div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;        <span class="keywordtype">float</span> c2 = v2.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a68ca7d92e9ea20d2a9a9f578ad7b681c.html#a68ca7d92e9ea20d2a9a9f578ad7b681c">getConfidence</a>();</div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;        <span class="keywordtype">float</span> w = <a class="code" href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a35ac262407303cdf8d11f7892f9a3a03.html#a35ac262407303cdf8d11f7892f9a3a03">and</a>(f2, c1, c2);</div>
<div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;        <span class="keywordtype">float</span> c = <a class="code" href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a957a91e3b91d4a4043c3959838c370f2.html#a957a91e3b91d4a4043c3959838c370f2">w2c</a>(w);</div>
<div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a>(f1, c);</div>
<div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;    }</div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;</div>
<div class="line"><a name="l00204"></a><span class="lineno"><a class="line" href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_a3c2af6c7d01507c33ff76a03e2ae6e21.html#a3c2af6c7d01507c33ff76a03e2ae6e21">  204</a></span>&#160;    <span class="keyword">static</span> <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> <a class="code" href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_a3c2af6c7d01507c33ff76a03e2ae6e21.html#a3c2af6c7d01507c33ff76a03e2ae6e21">abduction</a>(<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> v1, <span class="keywordtype">float</span> reliance) {</div>
<div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;        <span class="keywordtype">float</span> f1 = v1.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a9eac33f2495441c77911a8581a5bbe61.html#a9eac33f2495441c77911a8581a5bbe61">getFrequency</a>();</div>
<div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;        <span class="keywordtype">float</span> c1 = v1.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a68ca7d92e9ea20d2a9a9f578ad7b681c.html#a68ca7d92e9ea20d2a9a9f578ad7b681c">getConfidence</a>();</div>
<div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;        <span class="keywordtype">float</span> w = <a class="code" href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a35ac262407303cdf8d11f7892f9a3a03.html#a35ac262407303cdf8d11f7892f9a3a03">and</a>(c1, reliance);</div>
<div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;        <span class="keywordtype">float</span> c = <a class="code" href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a957a91e3b91d4a4043c3959838c370f2.html#a957a91e3b91d4a4043c3959838c370f2">w2c</a>(w);</div>
<div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a>(f1, c);</div>
<div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;    }</div>
<div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;</div>
<div class="line"><a name="l00221"></a><span class="lineno"><a class="line" href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_aed67308b830f5b1780c075f2736f3ad0.html#aed67308b830f5b1780c075f2736f3ad0">  221</a></span>&#160;    <span class="keyword">static</span> <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> <a class="code" href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_aed67308b830f5b1780c075f2736f3ad0.html#aed67308b830f5b1780c075f2736f3ad0">induction</a>(<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> v1, <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> v2) {</div>
<div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_ab001ba72b5926188d21dd48a5eaaeb8b.html#ab001ba72b5926188d21dd48a5eaaeb8b">abduction</a>(v2, v1);</div>
<div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;    }</div>
<div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;</div>
<div class="line"><a name="l00236"></a><span class="lineno"><a class="line" href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_a54676ae3de8c6ef712566837b99d08a1.html#a54676ae3de8c6ef712566837b99d08a1">  236</a></span>&#160;    <span class="keyword">static</span> <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> <a class="code" href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_a54676ae3de8c6ef712566837b99d08a1.html#a54676ae3de8c6ef712566837b99d08a1">exemplification</a>(<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> v1, <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> v2) {</div>
<div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;        <span class="keywordtype">float</span> f1 = v1.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a9eac33f2495441c77911a8581a5bbe61.html#a9eac33f2495441c77911a8581a5bbe61">getFrequency</a>();</div>
<div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;        <span class="keywordtype">float</span> f2 = v2.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a9eac33f2495441c77911a8581a5bbe61.html#a9eac33f2495441c77911a8581a5bbe61">getFrequency</a>();</div>
<div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;        <span class="keywordtype">float</span> c1 = v1.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a68ca7d92e9ea20d2a9a9f578ad7b681c.html#a68ca7d92e9ea20d2a9a9f578ad7b681c">getConfidence</a>();</div>
<div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;        <span class="keywordtype">float</span> c2 = v2.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a68ca7d92e9ea20d2a9a9f578ad7b681c.html#a68ca7d92e9ea20d2a9a9f578ad7b681c">getConfidence</a>();</div>
<div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;        <span class="keywordtype">float</span> w = <a class="code" href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a35ac262407303cdf8d11f7892f9a3a03.html#a35ac262407303cdf8d11f7892f9a3a03">and</a>(f1, f2, c1, c2);</div>
<div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;        <span class="keywordtype">float</span> c = <a class="code" href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a957a91e3b91d4a4043c3959838c370f2.html#a957a91e3b91d4a4043c3959838c370f2">w2c</a>(w);</div>
<div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a>(1, c);</div>
<div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;    }</div>
<div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;</div>
<div class="line"><a name="l00255"></a><span class="lineno"><a class="line" href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_a0eded294e31894aad09eb976587a20d3.html#a0eded294e31894aad09eb976587a20d3">  255</a></span>&#160;    <span class="keyword">static</span> <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> <a class="code" href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_a0eded294e31894aad09eb976587a20d3.html#a0eded294e31894aad09eb976587a20d3">comparison</a>(<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> v1, <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> v2) {</div>
<div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;        <span class="keywordtype">float</span> f1 = v1.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a9eac33f2495441c77911a8581a5bbe61.html#a9eac33f2495441c77911a8581a5bbe61">getFrequency</a>();</div>
<div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;        <span class="keywordtype">float</span> f2 = v2.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a9eac33f2495441c77911a8581a5bbe61.html#a9eac33f2495441c77911a8581a5bbe61">getFrequency</a>();</div>
<div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;        <span class="keywordtype">float</span> c1 = v1.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a68ca7d92e9ea20d2a9a9f578ad7b681c.html#a68ca7d92e9ea20d2a9a9f578ad7b681c">getConfidence</a>();</div>
<div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;        <span class="keywordtype">float</span> c2 = v2.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a68ca7d92e9ea20d2a9a9f578ad7b681c.html#a68ca7d92e9ea20d2a9a9f578ad7b681c">getConfidence</a>();</div>
<div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;        <span class="keywordtype">float</span> f0 = <a class="code" href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a24093a77b49f21322e62c9bed7ff5ee2.html#a24093a77b49f21322e62c9bed7ff5ee2">or</a>(f1, f2);</div>
<div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;        <span class="keywordtype">float</span> f = (f0 == 0) ? 0 : (<a class="code" href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a35ac262407303cdf8d11f7892f9a3a03.html#a35ac262407303cdf8d11f7892f9a3a03">and</a>(f1, f2) / f0);</div>
<div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;        <span class="keywordtype">float</span> w = <a class="code" href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a35ac262407303cdf8d11f7892f9a3a03.html#a35ac262407303cdf8d11f7892f9a3a03">and</a>(f0, c1, c2);</div>
<div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;        <span class="keywordtype">float</span> c = <a class="code" href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a957a91e3b91d4a4043c3959838c370f2.html#a957a91e3b91d4a4043c3959838c370f2">w2c</a>(w);</div>
<div class="line"><a name="l00264"></a><span class="lineno">  264</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a>(f, c);</div>
<div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;    }</div>
<div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;</div>
<div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;    <span class="comment">/* ----- desire-value functions, called in SyllogisticRules ----- */</span></div>
<div class="line"><a name="l00277"></a><span class="lineno"><a class="line" href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_aeebc439ecfbe6f4aa80a39f3eda0dc05.html#aeebc439ecfbe6f4aa80a39f3eda0dc05">  277</a></span>&#160;    <span class="keyword">static</span> <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> <a class="code" href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_aeebc439ecfbe6f4aa80a39f3eda0dc05.html#aeebc439ecfbe6f4aa80a39f3eda0dc05">desireStrong</a>(<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> v1, <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> v2) {</div>
<div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160;        <span class="keywordtype">float</span> f1 = v1.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a9eac33f2495441c77911a8581a5bbe61.html#a9eac33f2495441c77911a8581a5bbe61">getFrequency</a>();</div>
<div class="line"><a name="l00279"></a><span class="lineno">  279</span>&#160;        <span class="keywordtype">float</span> f2 = v2.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a9eac33f2495441c77911a8581a5bbe61.html#a9eac33f2495441c77911a8581a5bbe61">getFrequency</a>();</div>
<div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;        <span class="keywordtype">float</span> c1 = v1.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a68ca7d92e9ea20d2a9a9f578ad7b681c.html#a68ca7d92e9ea20d2a9a9f578ad7b681c">getConfidence</a>();</div>
<div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;        <span class="keywordtype">float</span> c2 = v2.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a68ca7d92e9ea20d2a9a9f578ad7b681c.html#a68ca7d92e9ea20d2a9a9f578ad7b681c">getConfidence</a>();</div>
<div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;        <span class="keywordtype">float</span> f = <a class="code" href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a35ac262407303cdf8d11f7892f9a3a03.html#a35ac262407303cdf8d11f7892f9a3a03">and</a>(f1, f2);</div>
<div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;        <span class="keywordtype">float</span> c = <a class="code" href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a35ac262407303cdf8d11f7892f9a3a03.html#a35ac262407303cdf8d11f7892f9a3a03">and</a>(c1, c2, f2);</div>
<div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a>(f, c);</div>
<div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;    }</div>
<div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;</div>
<div class="line"><a name="l00296"></a><span class="lineno"><a class="line" href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_ad7bc2b54e412adaf906d962a8e477428.html#ad7bc2b54e412adaf906d962a8e477428">  296</a></span>&#160;    <span class="keyword">static</span> <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> <a class="code" href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_ad7bc2b54e412adaf906d962a8e477428.html#ad7bc2b54e412adaf906d962a8e477428">desireWeak</a>(<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> v1, <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> v2) {</div>
<div class="line"><a name="l00297"></a><span class="lineno">  297</span>&#160;        <span class="keywordtype">float</span> f1 = v1.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a9eac33f2495441c77911a8581a5bbe61.html#a9eac33f2495441c77911a8581a5bbe61">getFrequency</a>();</div>
<div class="line"><a name="l00298"></a><span class="lineno">  298</span>&#160;        <span class="keywordtype">float</span> f2 = v2.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a9eac33f2495441c77911a8581a5bbe61.html#a9eac33f2495441c77911a8581a5bbe61">getFrequency</a>();</div>
<div class="line"><a name="l00299"></a><span class="lineno">  299</span>&#160;        <span class="keywordtype">float</span> c1 = v1.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a68ca7d92e9ea20d2a9a9f578ad7b681c.html#a68ca7d92e9ea20d2a9a9f578ad7b681c">getConfidence</a>();</div>
<div class="line"><a name="l00300"></a><span class="lineno">  300</span>&#160;        <span class="keywordtype">float</span> c2 = v2.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a68ca7d92e9ea20d2a9a9f578ad7b681c.html#a68ca7d92e9ea20d2a9a9f578ad7b681c">getConfidence</a>();</div>
<div class="line"><a name="l00301"></a><span class="lineno">  301</span>&#160;        <span class="keywordtype">float</span> f = <a class="code" href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a35ac262407303cdf8d11f7892f9a3a03.html#a35ac262407303cdf8d11f7892f9a3a03">and</a>(f1, f2);</div>
<div class="line"><a name="l00302"></a><span class="lineno">  302</span>&#160;        <span class="keywordtype">float</span> c = <a class="code" href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a35ac262407303cdf8d11f7892f9a3a03.html#a35ac262407303cdf8d11f7892f9a3a03">and</a>(c1, c2, f2, <a class="code" href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a957a91e3b91d4a4043c3959838c370f2.html#a957a91e3b91d4a4043c3959838c370f2">w2c</a>(1.0f));</div>
<div class="line"><a name="l00303"></a><span class="lineno">  303</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a>(f, c);</div>
<div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160;    }</div>
<div class="line"><a name="l00305"></a><span class="lineno">  305</span>&#160;</div>
<div class="line"><a name="l00315"></a><span class="lineno"><a class="line" href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_a8fd216794e4f1458287c579cf27956d0.html#a8fd216794e4f1458287c579cf27956d0">  315</a></span>&#160;    <span class="keyword">static</span> <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> <a class="code" href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_a8fd216794e4f1458287c579cf27956d0.html#a8fd216794e4f1458287c579cf27956d0">desireDed</a>(<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> v1, <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> v2) {</div>
<div class="line"><a name="l00316"></a><span class="lineno">  316</span>&#160;        <span class="keywordtype">float</span> f1 = v1.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a9eac33f2495441c77911a8581a5bbe61.html#a9eac33f2495441c77911a8581a5bbe61">getFrequency</a>();</div>
<div class="line"><a name="l00317"></a><span class="lineno">  317</span>&#160;        <span class="keywordtype">float</span> f2 = v2.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a9eac33f2495441c77911a8581a5bbe61.html#a9eac33f2495441c77911a8581a5bbe61">getFrequency</a>();</div>
<div class="line"><a name="l00318"></a><span class="lineno">  318</span>&#160;        <span class="keywordtype">float</span> c1 = v1.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a68ca7d92e9ea20d2a9a9f578ad7b681c.html#a68ca7d92e9ea20d2a9a9f578ad7b681c">getConfidence</a>();</div>
<div class="line"><a name="l00319"></a><span class="lineno">  319</span>&#160;        <span class="keywordtype">float</span> c2 = v2.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a68ca7d92e9ea20d2a9a9f578ad7b681c.html#a68ca7d92e9ea20d2a9a9f578ad7b681c">getConfidence</a>();</div>
<div class="line"><a name="l00320"></a><span class="lineno">  320</span>&#160;        <span class="keywordtype">float</span> f = <a class="code" href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a35ac262407303cdf8d11f7892f9a3a03.html#a35ac262407303cdf8d11f7892f9a3a03">and</a>(f1, f2);</div>
<div class="line"><a name="l00321"></a><span class="lineno">  321</span>&#160;        <span class="keywordtype">float</span> c = <a class="code" href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a35ac262407303cdf8d11f7892f9a3a03.html#a35ac262407303cdf8d11f7892f9a3a03">and</a>(c1, c2);</div>
<div class="line"><a name="l00322"></a><span class="lineno">  322</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a>(f, c);</div>
<div class="line"><a name="l00323"></a><span class="lineno">  323</span>&#160;    }</div>
<div class="line"><a name="l00324"></a><span class="lineno">  324</span>&#160;</div>
<div class="line"><a name="l00334"></a><span class="lineno"><a class="line" href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_aa35b455da68c91d792d6466bf95b908b.html#aa35b455da68c91d792d6466bf95b908b">  334</a></span>&#160;    <span class="keyword">static</span> <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> <a class="code" href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_aa35b455da68c91d792d6466bf95b908b.html#aa35b455da68c91d792d6466bf95b908b">desireInd</a>(<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> v1, <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> v2) {</div>
<div class="line"><a name="l00335"></a><span class="lineno">  335</span>&#160;        <span class="keywordtype">float</span> f1 = v1.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a9eac33f2495441c77911a8581a5bbe61.html#a9eac33f2495441c77911a8581a5bbe61">getFrequency</a>();</div>
<div class="line"><a name="l00336"></a><span class="lineno">  336</span>&#160;        <span class="keywordtype">float</span> f2 = v2.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a9eac33f2495441c77911a8581a5bbe61.html#a9eac33f2495441c77911a8581a5bbe61">getFrequency</a>();</div>
<div class="line"><a name="l00337"></a><span class="lineno">  337</span>&#160;        <span class="keywordtype">float</span> c1 = v1.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a68ca7d92e9ea20d2a9a9f578ad7b681c.html#a68ca7d92e9ea20d2a9a9f578ad7b681c">getConfidence</a>();</div>
<div class="line"><a name="l00338"></a><span class="lineno">  338</span>&#160;        <span class="keywordtype">float</span> c2 = v2.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a68ca7d92e9ea20d2a9a9f578ad7b681c.html#a68ca7d92e9ea20d2a9a9f578ad7b681c">getConfidence</a>();</div>
<div class="line"><a name="l00339"></a><span class="lineno">  339</span>&#160;        <span class="keywordtype">float</span> w = <a class="code" href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a35ac262407303cdf8d11f7892f9a3a03.html#a35ac262407303cdf8d11f7892f9a3a03">and</a>(f2, c1, c2);</div>
<div class="line"><a name="l00340"></a><span class="lineno">  340</span>&#160;        <span class="keywordtype">float</span> c = <a class="code" href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a957a91e3b91d4a4043c3959838c370f2.html#a957a91e3b91d4a4043c3959838c370f2">w2c</a>(w);</div>
<div class="line"><a name="l00341"></a><span class="lineno">  341</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a>(f1, c);</div>
<div class="line"><a name="l00342"></a><span class="lineno">  342</span>&#160;    }</div>
<div class="line"><a name="l00343"></a><span class="lineno">  343</span>&#160;</div>
<div class="line"><a name="l00344"></a><span class="lineno">  344</span>&#160;    <span class="comment">/* ----- double argument functions, called in CompositionalRules ----- */</span></div>
<div class="line"><a name="l00354"></a><span class="lineno"><a class="line" href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_a471861b5c5919c45388bc871f48b71a2.html#a471861b5c5919c45388bc871f48b71a2">  354</a></span>&#160;    <span class="keyword">static</span> <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> <span class="keyword">union</span>(<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> v1, <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> v2) {</div>
<div class="line"><a name="l00355"></a><span class="lineno">  355</span>&#160;        <span class="keywordtype">float</span> f1 = v1.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a9eac33f2495441c77911a8581a5bbe61.html#a9eac33f2495441c77911a8581a5bbe61">getFrequency</a>();</div>
<div class="line"><a name="l00356"></a><span class="lineno">  356</span>&#160;        <span class="keywordtype">float</span> f2 = v2.getFrequency();</div>
<div class="line"><a name="l00357"></a><span class="lineno">  357</span>&#160;        <span class="keywordtype">float</span> c1 = v1.getConfidence();</div>
<div class="line"><a name="l00358"></a><span class="lineno">  358</span>&#160;        <span class="keywordtype">float</span> c2 = v2.getConfidence();</div>
<div class="line"><a name="l00359"></a><span class="lineno">  359</span>&#160;        <span class="keywordtype">float</span> f = <a class="code" href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a24093a77b49f21322e62c9bed7ff5ee2.html#a24093a77b49f21322e62c9bed7ff5ee2">or</a>(f1, f2);</div>
<div class="line"><a name="l00360"></a><span class="lineno">  360</span>&#160;        <span class="comment">// float c = or(and(f1, c1), and(f2, c2)) + and(1 - f1, 1 - f2, c1, c2);</span></div>
<div class="line"><a name="l00361"></a><span class="lineno">  361</span>&#160;        <span class="keywordtype">float</span> c = <a class="code" href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a35ac262407303cdf8d11f7892f9a3a03.html#a35ac262407303cdf8d11f7892f9a3a03">and</a>(c1, c2);</div>
<div class="line"><a name="l00362"></a><span class="lineno">  362</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a>(f, c);</div>
<div class="line"><a name="l00363"></a><span class="lineno">  363</span>&#160;    }</div>
<div class="line"><a name="l00364"></a><span class="lineno">  364</span>&#160;</div>
<div class="line"><a name="l00374"></a><span class="lineno"><a class="line" href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_a20446cf012806110b595d9d1309bba24.html#a20446cf012806110b595d9d1309bba24">  374</a></span>&#160;    <span class="keyword">static</span> <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> <a class="code" href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_a20446cf012806110b595d9d1309bba24.html#a20446cf012806110b595d9d1309bba24">intersection</a>(<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> v1, <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> v2) {</div>
<div class="line"><a name="l00375"></a><span class="lineno">  375</span>&#160;        <span class="keywordtype">float</span> f1 = v1.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a9eac33f2495441c77911a8581a5bbe61.html#a9eac33f2495441c77911a8581a5bbe61">getFrequency</a>();</div>
<div class="line"><a name="l00376"></a><span class="lineno">  376</span>&#160;        <span class="keywordtype">float</span> f2 = v2.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a9eac33f2495441c77911a8581a5bbe61.html#a9eac33f2495441c77911a8581a5bbe61">getFrequency</a>();</div>
<div class="line"><a name="l00377"></a><span class="lineno">  377</span>&#160;        <span class="keywordtype">float</span> c1 = v1.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a68ca7d92e9ea20d2a9a9f578ad7b681c.html#a68ca7d92e9ea20d2a9a9f578ad7b681c">getConfidence</a>();</div>
<div class="line"><a name="l00378"></a><span class="lineno">  378</span>&#160;        <span class="keywordtype">float</span> c2 = v2.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a68ca7d92e9ea20d2a9a9f578ad7b681c.html#a68ca7d92e9ea20d2a9a9f578ad7b681c">getConfidence</a>();</div>
<div class="line"><a name="l00379"></a><span class="lineno">  379</span>&#160;        <span class="keywordtype">float</span> f = <a class="code" href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a35ac262407303cdf8d11f7892f9a3a03.html#a35ac262407303cdf8d11f7892f9a3a03">and</a>(f1, f2);</div>
<div class="line"><a name="l00380"></a><span class="lineno">  380</span>&#160;        <span class="keywordtype">float</span> c = <a class="code" href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a35ac262407303cdf8d11f7892f9a3a03.html#a35ac262407303cdf8d11f7892f9a3a03">and</a>(c1, c2);</div>
<div class="line"><a name="l00381"></a><span class="lineno">  381</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a>(f, c);</div>
<div class="line"><a name="l00382"></a><span class="lineno">  382</span>&#160;    }</div>
<div class="line"><a name="l00383"></a><span class="lineno">  383</span>&#160;</div>
<div class="line"><a name="l00393"></a><span class="lineno"><a class="line" href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_a2c88a176105542a01810dc2fa4c68a54.html#a2c88a176105542a01810dc2fa4c68a54">  393</a></span>&#160;    <span class="keyword">static</span> <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> <a class="code" href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_a2c88a176105542a01810dc2fa4c68a54.html#a2c88a176105542a01810dc2fa4c68a54">reduceDisjunction</a>(<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> v1, <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> v2) {</div>
<div class="line"><a name="l00394"></a><span class="lineno">  394</span>&#160;        <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> v0 = <a class="code" href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_a20446cf012806110b595d9d1309bba24.html#a20446cf012806110b595d9d1309bba24">intersection</a>(v1, <a class="code" href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_ace28b3a18d275b33d2a094189842b2ed.html#ace28b3a18d275b33d2a094189842b2ed">negation</a>(v2));</div>
<div class="line"><a name="l00395"></a><span class="lineno">  395</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_af0cd0f846c8a7e500840b517ab006b94.html#af0cd0f846c8a7e500840b517ab006b94">deduction</a>(v0, 1f);</div>
<div class="line"><a name="l00396"></a><span class="lineno">  396</span>&#160;    }</div>
<div class="line"><a name="l00397"></a><span class="lineno">  397</span>&#160;</div>
<div class="line"><a name="l00407"></a><span class="lineno"><a class="line" href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_ae8945611915519f50ab3392c9168b170.html#ae8945611915519f50ab3392c9168b170">  407</a></span>&#160;    <span class="keyword">static</span> <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> <a class="code" href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_ae8945611915519f50ab3392c9168b170.html#ae8945611915519f50ab3392c9168b170">reduceConjunction</a>(<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> v1, <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> v2) {</div>
<div class="line"><a name="l00408"></a><span class="lineno">  408</span>&#160;        <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> v0 = <a class="code" href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_a20446cf012806110b595d9d1309bba24.html#a20446cf012806110b595d9d1309bba24">intersection</a>(<a class="code" href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_ace28b3a18d275b33d2a094189842b2ed.html#ace28b3a18d275b33d2a094189842b2ed">negation</a>(v1), v2);</div>
<div class="line"><a name="l00409"></a><span class="lineno">  409</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_ace28b3a18d275b33d2a094189842b2ed.html#ace28b3a18d275b33d2a094189842b2ed">negation</a>(<a class="code" href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_af0cd0f846c8a7e500840b517ab006b94.html#af0cd0f846c8a7e500840b517ab006b94">deduction</a>(v0, 1f));</div>
<div class="line"><a name="l00410"></a><span class="lineno">  410</span>&#160;    }</div>
<div class="line"><a name="l00411"></a><span class="lineno">  411</span>&#160;</div>
<div class="line"><a name="l00421"></a><span class="lineno"><a class="line" href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_af3bd991ec2bf11c3c8c622b0857ece31.html#af3bd991ec2bf11c3c8c622b0857ece31">  421</a></span>&#160;    <span class="keyword">static</span> <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> <a class="code" href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_af3bd991ec2bf11c3c8c622b0857ece31.html#af3bd991ec2bf11c3c8c622b0857ece31">reduceConjunctionNeg</a>(<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> v1, <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> v2) {</div>
<div class="line"><a name="l00422"></a><span class="lineno">  422</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_ae8945611915519f50ab3392c9168b170.html#ae8945611915519f50ab3392c9168b170">reduceConjunction</a>(v1, <a class="code" href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_ace28b3a18d275b33d2a094189842b2ed.html#ace28b3a18d275b33d2a094189842b2ed">negation</a>(v2));</div>
<div class="line"><a name="l00423"></a><span class="lineno">  423</span>&#160;    }</div>
<div class="line"><a name="l00424"></a><span class="lineno">  424</span>&#160;</div>
<div class="line"><a name="l00434"></a><span class="lineno"><a class="line" href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_ad7f4353395335ad37f76d83ea8aae8e2.html#ad7f4353395335ad37f76d83ea8aae8e2">  434</a></span>&#160;    <span class="keyword">static</span> <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> <a class="code" href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_ad7f4353395335ad37f76d83ea8aae8e2.html#ad7f4353395335ad37f76d83ea8aae8e2">anonymousAnalogy</a>(<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> v1, <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> v2) {</div>
<div class="line"><a name="l00435"></a><span class="lineno">  435</span>&#160;        <span class="keywordtype">float</span> f1 = v1.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a9eac33f2495441c77911a8581a5bbe61.html#a9eac33f2495441c77911a8581a5bbe61">getFrequency</a>();</div>
<div class="line"><a name="l00436"></a><span class="lineno">  436</span>&#160;        <span class="keywordtype">float</span> c1 = v1.<a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a68ca7d92e9ea20d2a9a9f578ad7b681c.html#a68ca7d92e9ea20d2a9a9f578ad7b681c">getConfidence</a>();</div>
<div class="line"><a name="l00437"></a><span class="lineno">  437</span>&#160;        <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> v0 = <span class="keyword">new</span> <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a>(f1, <a class="code" href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a957a91e3b91d4a4043c3959838c370f2.html#a957a91e3b91d4a4043c3959838c370f2">w2c</a>(c1));</div>
<div class="line"><a name="l00438"></a><span class="lineno">  438</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_a93ca820557fc8d18ef741bd33501126f.html#a93ca820557fc8d18ef741bd33501126f">analogy</a>(v2, v0);</div>
<div class="line"><a name="l00439"></a><span class="lineno">  439</span>&#160;    }</div>
<div class="line"><a name="l00440"></a><span class="lineno">  440</span>&#160;}</div>
<div class="ttc" id="classnars_1_1inference_1_1TruthFunctions_ab001ba72b5926188d21dd48a5eaaeb8b_html_ab001ba72b5926188d21dd48a5eaaeb8b"><div class="ttname"><a href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_ab001ba72b5926188d21dd48a5eaaeb8b.html#ab001ba72b5926188d21dd48a5eaaeb8b">nars.inference.TruthFunctions.abduction</a></div><div class="ttdeci">static TruthValue abduction(TruthValue v1, TruthValue v2)</div><div class="ttdoc">{<S ==> M>, </div><div class="ttdef"><b>Definition:</b> <a href="../../df/d29/TruthFunctions_8java_source.html#l00183">TruthFunctions.java:183</a></div></div>
<div class="ttc" id="classnars_1_1inference_1_1TruthFunctions_a3a5a75db35145955b00958489a5ce50d_html_a3a5a75db35145955b00958489a5ce50d"><div class="ttname"><a href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_a3a5a75db35145955b00958489a5ce50d.html#a3a5a75db35145955b00958489a5ce50d">nars.inference.TruthFunctions.conversion</a></div><div class="ttdeci">static TruthValue conversion(TruthValue v1)</div><div class="ttdoc">{<A ==> B>} |- <B ==> A> </div><div class="ttdef"><b>Definition:</b> <a href="../../df/d29/TruthFunctions_8java_source.html#l00038">TruthFunctions.java:38</a></div></div>
<div class="ttc" id="classnars_1_1inference_1_1TruthFunctions_a20446cf012806110b595d9d1309bba24_html_a20446cf012806110b595d9d1309bba24"><div class="ttname"><a href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_a20446cf012806110b595d9d1309bba24.html#a20446cf012806110b595d9d1309bba24">nars.inference.TruthFunctions.intersection</a></div><div class="ttdeci">static TruthValue intersection(TruthValue v1, TruthValue v2)</div><div class="ttdoc">{<M --> S>, <M <-> P>} |- <M --> (S&P)> </div><div class="ttdef"><b>Definition:</b> <a href="../../df/d29/TruthFunctions_8java_source.html#l00374">TruthFunctions.java:374</a></div></div>
<div class="ttc" id="classnars_1_1inference_1_1TruthFunctions_html"><div class="ttname"><a href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions.html">nars.inference.TruthFunctions</a></div><div class="ttdoc">All truth-value (and desire-value) functions used in inference rules. </div><div class="ttdef"><b>Definition:</b> <a href="../../df/d29/TruthFunctions_8java_source.html#l00028">TruthFunctions.java:28</a></div></div>
<div class="ttc" id="namespacenars_1_1entity_html"><div class="ttname"><a href="../../db/dec/namespacenars_1_1entity.html">nars.entity</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d8/d59/BudgetValue_8java_source.html#l00021">BudgetValue.java:21</a></div></div>
<div class="ttc" id="classnars_1_1entity_1_1TruthValue_a9eac33f2495441c77911a8581a5bbe61_html_a9eac33f2495441c77911a8581a5bbe61"><div class="ttname"><a href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a9eac33f2495441c77911a8581a5bbe61.html#a9eac33f2495441c77911a8581a5bbe61">nars.entity.TruthValue.getFrequency</a></div><div class="ttdeci">float getFrequency()</div><div class="ttdoc">Get the frequency value. </div><div class="ttdef"><b>Definition:</b> <a href="../../de/de7/TruthValue_8java_source.html#l00061">TruthValue.java:61</a></div></div>
<div class="ttc" id="classnars_1_1inference_1_1TruthFunctions_af3bd991ec2bf11c3c8c622b0857ece31_html_af3bd991ec2bf11c3c8c622b0857ece31"><div class="ttname"><a href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_af3bd991ec2bf11c3c8c622b0857ece31.html#af3bd991ec2bf11c3c8c622b0857ece31">nars.inference.TruthFunctions.reduceConjunctionNeg</a></div><div class="ttdeci">static TruthValue reduceConjunctionNeg(TruthValue v1, TruthValue v2)</div><div class="ttdoc">{(–, (&&, A, (–, B))), (–, B)} |- (–, A) </div><div class="ttdef"><b>Definition:</b> <a href="../../df/d29/TruthFunctions_8java_source.html#l00421">TruthFunctions.java:421</a></div></div>
<div class="ttc" id="classnars_1_1inference_1_1TruthFunctions_a54676ae3de8c6ef712566837b99d08a1_html_a54676ae3de8c6ef712566837b99d08a1"><div class="ttname"><a href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_a54676ae3de8c6ef712566837b99d08a1.html#a54676ae3de8c6ef712566837b99d08a1">nars.inference.TruthFunctions.exemplification</a></div><div class="ttdeci">static TruthValue exemplification(TruthValue v1, TruthValue v2)</div><div class="ttdoc">{<M ==> S>, </div><div class="ttdef"><b>Definition:</b> <a href="../../df/d29/TruthFunctions_8java_source.html#l00236">TruthFunctions.java:236</a></div></div>
<div class="ttc" id="classnars_1_1inference_1_1TruthFunctions_af0cd0f846c8a7e500840b517ab006b94_html_af0cd0f846c8a7e500840b517ab006b94"><div class="ttname"><a href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_af0cd0f846c8a7e500840b517ab006b94.html#af0cd0f846c8a7e500840b517ab006b94">nars.inference.TruthFunctions.deduction</a></div><div class="ttdeci">static TruthValue deduction(TruthValue v1, TruthValue v2)</div><div class="ttdoc">{<S ==> M>, <M ==> P>} |- <S ==> P> </div><div class="ttdef"><b>Definition:</b> <a href="../../df/d29/TruthFunctions_8java_source.html#l00108">TruthFunctions.java:108</a></div></div>
<div class="ttc" id="classnars_1_1inference_1_1TruthFunctions_aed67308b830f5b1780c075f2736f3ad0_html_aed67308b830f5b1780c075f2736f3ad0"><div class="ttname"><a href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_aed67308b830f5b1780c075f2736f3ad0.html#aed67308b830f5b1780c075f2736f3ad0">nars.inference.TruthFunctions.induction</a></div><div class="ttdeci">static TruthValue induction(TruthValue v1, TruthValue v2)</div><div class="ttdoc">{<M ==> S>, <M ==> P>} |- <S ==> P> </div><div class="ttdef"><b>Definition:</b> <a href="../../df/d29/TruthFunctions_8java_source.html#l00221">TruthFunctions.java:221</a></div></div>
<div class="ttc" id="classnars_1_1inference_1_1UtilityFunctions_a2020576689d5aebb96d6915150cc7b9d_html_a2020576689d5aebb96d6915150cc7b9d"><div class="ttname"><a href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a2020576689d5aebb96d6915150cc7b9d.html#a2020576689d5aebb96d6915150cc7b9d">nars.inference.UtilityFunctions.c2w</a></div><div class="ttdeci">static float c2w(float c)</div><div class="ttdoc">A function to convert confidence to weight. </div><div class="ttdef"><b>Definition:</b> <a href="../../db/d95/UtilityFunctions_8java_source.html#l00096">UtilityFunctions.java:96</a></div></div>
<div class="ttc" id="classnars_1_1inference_1_1TruthFunctions_a8fd216794e4f1458287c579cf27956d0_html_a8fd216794e4f1458287c579cf27956d0"><div class="ttname"><a href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_a8fd216794e4f1458287c579cf27956d0.html#a8fd216794e4f1458287c579cf27956d0">nars.inference.TruthFunctions.desireDed</a></div><div class="ttdeci">static TruthValue desireDed(TruthValue v1, TruthValue v2)</div><div class="ttdoc">A function specially designed for desire value [To be refined]. </div><div class="ttdef"><b>Definition:</b> <a href="../../df/d29/TruthFunctions_8java_source.html#l00315">TruthFunctions.java:315</a></div></div>
<div class="ttc" id="classnars_1_1inference_1_1UtilityFunctions_a35ac262407303cdf8d11f7892f9a3a03_html_a35ac262407303cdf8d11f7892f9a3a03"><div class="ttname"><a href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a35ac262407303cdf8d11f7892f9a3a03.html#a35ac262407303cdf8d11f7892f9a3a03">nars.inference.UtilityFunctions.and</a></div><div class="ttdeci">static float and(float...arr)</div><div class="ttdoc">A function where the output is conjunctively determined by the inputs. </div><div class="ttdef"><b>Definition:</b> <a href="../../db/d95/UtilityFunctions_8java_source.html#l00035">UtilityFunctions.java:35</a></div></div>
<div class="ttc" id="classnars_1_1inference_1_1TruthFunctions_aeebc439ecfbe6f4aa80a39f3eda0dc05_html_aeebc439ecfbe6f4aa80a39f3eda0dc05"><div class="ttname"><a href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_aeebc439ecfbe6f4aa80a39f3eda0dc05.html#aeebc439ecfbe6f4aa80a39f3eda0dc05">nars.inference.TruthFunctions.desireStrong</a></div><div class="ttdeci">static TruthValue desireStrong(TruthValue v1, TruthValue v2)</div><div class="ttdoc">A function specially designed for desire value [To be refined]. </div><div class="ttdef"><b>Definition:</b> <a href="../../df/d29/TruthFunctions_8java_source.html#l00277">TruthFunctions.java:277</a></div></div>
<div class="ttc" id="classnars_1_1inference_1_1UtilityFunctions_html"><div class="ttname"><a href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions.html">nars.inference.UtilityFunctions</a></div><div class="ttdoc">Common functions on real numbers, mostly in [0,1]. </div><div class="ttdef"><b>Definition:</b> <a href="../../db/d95/UtilityFunctions_8java_source.html#l00028">UtilityFunctions.java:28</a></div></div>
<div class="ttc" id="classnars_1_1inference_1_1TruthFunctions_a2c88a176105542a01810dc2fa4c68a54_html_a2c88a176105542a01810dc2fa4c68a54"><div class="ttname"><a href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_a2c88a176105542a01810dc2fa4c68a54.html#a2c88a176105542a01810dc2fa4c68a54">nars.inference.TruthFunctions.reduceDisjunction</a></div><div class="ttdeci">static TruthValue reduceDisjunction(TruthValue v1, TruthValue v2)</div><div class="ttdoc">{(||, A, B), (–, B)} |- A </div><div class="ttdef"><b>Definition:</b> <a href="../../df/d29/TruthFunctions_8java_source.html#l00393">TruthFunctions.java:393</a></div></div>
<div class="ttc" id="namespacenars_html"><div class="ttname"><a href="../../d7/d81/namespacenars.html">nars</a></div></div>
<div class="ttc" id="classnars_1_1inference_1_1UtilityFunctions_a24093a77b49f21322e62c9bed7ff5ee2_html_a24093a77b49f21322e62c9bed7ff5ee2"><div class="ttname"><a href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a24093a77b49f21322e62c9bed7ff5ee2.html#a24093a77b49f21322e62c9bed7ff5ee2">nars.inference.UtilityFunctions.or</a></div><div class="ttdeci">static float or(float...arr)</div><div class="ttdoc">A function where the output is disjunctively determined by the inputs. </div><div class="ttdef"><b>Definition:</b> <a href="../../db/d95/UtilityFunctions_8java_source.html#l00048">UtilityFunctions.java:48</a></div></div>
<div class="ttc" id="classnars_1_1inference_1_1TruthFunctions_a22620614c797410623291399bae01a0b_html_a22620614c797410623291399bae01a0b"><div class="ttname"><a href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_a22620614c797410623291399bae01a0b.html#a22620614c797410623291399bae01a0b">nars.inference.TruthFunctions.revision</a></div><div class="ttdeci">static TruthValue revision(TruthValue v1, TruthValue v2)</div><div class="ttdoc">{<S ==> P>, <S ==> P>} |- <S ==> P> </div><div class="ttdef"><b>Definition:</b> <a href="../../df/d29/TruthFunctions_8java_source.html#l00085">TruthFunctions.java:85</a></div></div>
<div class="ttc" id="classnars_1_1inference_1_1TruthFunctions_a3c2af6c7d01507c33ff76a03e2ae6e21_html_a3c2af6c7d01507c33ff76a03e2ae6e21"><div class="ttname"><a href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_a3c2af6c7d01507c33ff76a03e2ae6e21.html#a3c2af6c7d01507c33ff76a03e2ae6e21">nars.inference.TruthFunctions.abduction</a></div><div class="ttdeci">static TruthValue abduction(TruthValue v1, float reliance)</div><div class="ttdoc">{M, </div><div class="ttdef"><b>Definition:</b> <a href="../../df/d29/TruthFunctions_8java_source.html#l00204">TruthFunctions.java:204</a></div></div>
<div class="ttc" id="classnars_1_1entity_1_1TruthValue_html"><div class="ttname"><a href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">nars.entity.TruthValue</a></div><div class="ttdoc">Frequency and confidence. </div><div class="ttdef"><b>Definition:</b> <a href="../../de/de7/TruthValue_8java_source.html#l00028">TruthValue.java:28</a></div></div>
<div class="ttc" id="classnars_1_1inference_1_1TruthFunctions_a36d2256df8aa616ab1ac7519a60312c8_html_a36d2256df8aa616ab1ac7519a60312c8"><div class="ttname"><a href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_a36d2256df8aa616ab1ac7519a60312c8.html#a36d2256df8aa616ab1ac7519a60312c8">nars.inference.TruthFunctions.deduction</a></div><div class="ttdeci">static TruthValue deduction(TruthValue v1, float reliance)</div><div class="ttdoc">{M, <M ==> P>} |- P </div><div class="ttdef"><b>Definition:</b> <a href="../../df/d29/TruthFunctions_8java_source.html#l00127">TruthFunctions.java:127</a></div></div>
<div class="ttc" id="classnars_1_1inference_1_1TruthFunctions_ad7bc2b54e412adaf906d962a8e477428_html_ad7bc2b54e412adaf906d962a8e477428"><div class="ttname"><a href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_ad7bc2b54e412adaf906d962a8e477428.html#ad7bc2b54e412adaf906d962a8e477428">nars.inference.TruthFunctions.desireWeak</a></div><div class="ttdeci">static TruthValue desireWeak(TruthValue v1, TruthValue v2)</div><div class="ttdoc">A function specially designed for desire value [To be refined]. </div><div class="ttdef"><b>Definition:</b> <a href="../../df/d29/TruthFunctions_8java_source.html#l00296">TruthFunctions.java:296</a></div></div>
<div class="ttc" id="classnars_1_1inference_1_1TruthFunctions_a8a24dac0bee6fb26bdf7de4517abe66c_html_a8a24dac0bee6fb26bdf7de4517abe66c"><div class="ttname"><a href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_a8a24dac0bee6fb26bdf7de4517abe66c.html#a8a24dac0bee6fb26bdf7de4517abe66c">nars.inference.TruthFunctions.contraposition</a></div><div class="ttdeci">static TruthValue contraposition(TruthValue v1)</div><div class="ttdoc">{<A ==> B>} |- <(–, B) ==> (–, A)> </div><div class="ttdef"><b>Definition:</b> <a href="../../df/d29/TruthFunctions_8java_source.html#l00067">TruthFunctions.java:67</a></div></div>
<div class="ttc" id="classnars_1_1inference_1_1TruthFunctions_a0eded294e31894aad09eb976587a20d3_html_a0eded294e31894aad09eb976587a20d3"><div class="ttname"><a href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_a0eded294e31894aad09eb976587a20d3.html#a0eded294e31894aad09eb976587a20d3">nars.inference.TruthFunctions.comparison</a></div><div class="ttdeci">static TruthValue comparison(TruthValue v1, TruthValue v2)</div><div class="ttdoc">{<M ==> S>, <M ==> P>} |- <S <=> P> </div><div class="ttdef"><b>Definition:</b> <a href="../../df/d29/TruthFunctions_8java_source.html#l00255">TruthFunctions.java:255</a></div></div>
<div class="ttc" id="classnars_1_1inference_1_1TruthFunctions_aa35b455da68c91d792d6466bf95b908b_html_aa35b455da68c91d792d6466bf95b908b"><div class="ttname"><a href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_aa35b455da68c91d792d6466bf95b908b.html#aa35b455da68c91d792d6466bf95b908b">nars.inference.TruthFunctions.desireInd</a></div><div class="ttdeci">static TruthValue desireInd(TruthValue v1, TruthValue v2)</div><div class="ttdoc">A function specially designed for desire value [To be refined]. </div><div class="ttdef"><b>Definition:</b> <a href="../../df/d29/TruthFunctions_8java_source.html#l00334">TruthFunctions.java:334</a></div></div>
<div class="ttc" id="classnars_1_1inference_1_1TruthFunctions_a6c1cb2626ef3303a17b5bc84c9da732f_html_a6c1cb2626ef3303a17b5bc84c9da732f"><div class="ttname"><a href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_a6c1cb2626ef3303a17b5bc84c9da732f.html#a6c1cb2626ef3303a17b5bc84c9da732f">nars.inference.TruthFunctions.resemblance</a></div><div class="ttdeci">static TruthValue resemblance(TruthValue v1, TruthValue v2)</div><div class="ttdoc">{<S <=> M>, <M <=> P>} |- <S <=> P> </div><div class="ttdef"><b>Definition:</b> <a href="../../df/d29/TruthFunctions_8java_source.html#l00162">TruthFunctions.java:162</a></div></div>
<div class="ttc" id="classnars_1_1inference_1_1TruthFunctions_ae8945611915519f50ab3392c9168b170_html_ae8945611915519f50ab3392c9168b170"><div class="ttname"><a href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_ae8945611915519f50ab3392c9168b170.html#ae8945611915519f50ab3392c9168b170">nars.inference.TruthFunctions.reduceConjunction</a></div><div class="ttdeci">static TruthValue reduceConjunction(TruthValue v1, TruthValue v2)</div><div class="ttdoc">{(–, (&&, A, B)), B} |- (–, A) </div><div class="ttdef"><b>Definition:</b> <a href="../../df/d29/TruthFunctions_8java_source.html#l00407">TruthFunctions.java:407</a></div></div>
<div class="ttc" id="classnars_1_1inference_1_1UtilityFunctions_a957a91e3b91d4a4043c3959838c370f2_html_a957a91e3b91d4a4043c3959838c370f2"><div class="ttname"><a href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a957a91e3b91d4a4043c3959838c370f2.html#a957a91e3b91d4a4043c3959838c370f2">nars.inference.UtilityFunctions.w2c</a></div><div class="ttdeci">static float w2c(float w)</div><div class="ttdoc">A function to convert weight to confidence. </div><div class="ttdef"><b>Definition:</b> <a href="../../db/d95/UtilityFunctions_8java_source.html#l00087">UtilityFunctions.java:87</a></div></div>
<div class="ttc" id="classnars_1_1inference_1_1TruthFunctions_ad7f4353395335ad37f76d83ea8aae8e2_html_ad7f4353395335ad37f76d83ea8aae8e2"><div class="ttname"><a href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_ad7f4353395335ad37f76d83ea8aae8e2.html#ad7f4353395335ad37f76d83ea8aae8e2">nars.inference.TruthFunctions.anonymousAnalogy</a></div><div class="ttdeci">static TruthValue anonymousAnalogy(TruthValue v1, TruthValue v2)</div><div class="ttdoc">{(&&, <#x() ==> M>, <#x() ==> P>), S ==> M} |- <S ==> P> </div><div class="ttdef"><b>Definition:</b> <a href="../../df/d29/TruthFunctions_8java_source.html#l00434">TruthFunctions.java:434</a></div></div>
<div class="ttc" id="classnars_1_1inference_1_1TruthFunctions_a93ca820557fc8d18ef741bd33501126f_html_a93ca820557fc8d18ef741bd33501126f"><div class="ttname"><a href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_a93ca820557fc8d18ef741bd33501126f.html#a93ca820557fc8d18ef741bd33501126f">nars.inference.TruthFunctions.analogy</a></div><div class="ttdeci">static TruthValue analogy(TruthValue v1, TruthValue v2)</div><div class="ttdoc">{<S ==> M>, <M <=> P>} |- <S ==> P> </div><div class="ttdef"><b>Definition:</b> <a href="../../df/d29/TruthFunctions_8java_source.html#l00143">TruthFunctions.java:143</a></div></div>
<div class="ttc" id="classnars_1_1inference_1_1TruthFunctions_ace28b3a18d275b33d2a094189842b2ed_html_ace28b3a18d275b33d2a094189842b2ed"><div class="ttname"><a href="../../d1/d58/classnars_1_1inference_1_1TruthFunctions_ace28b3a18d275b33d2a094189842b2ed.html#ace28b3a18d275b33d2a094189842b2ed">nars.inference.TruthFunctions.negation</a></div><div class="ttdeci">static TruthValue negation(TruthValue v1)</div><div class="ttdoc">{A} |- (–A) </div><div class="ttdef"><b>Definition:</b> <a href="../../df/d29/TruthFunctions_8java_source.html#l00054">TruthFunctions.java:54</a></div></div>
<div class="ttc" id="classnars_1_1entity_1_1TruthValue_a68ca7d92e9ea20d2a9a9f578ad7b681c_html_a68ca7d92e9ea20d2a9a9f578ad7b681c"><div class="ttname"><a href="../../d3/db8/classnars_1_1entity_1_1TruthValue_a68ca7d92e9ea20d2a9a9f578ad7b681c.html#a68ca7d92e9ea20d2a9a9f578ad7b681c">nars.entity.TruthValue.getConfidence</a></div><div class="ttdeci">float getConfidence()</div><div class="ttdoc">Get the confidence value. </div><div class="ttdef"><b>Definition:</b> <a href="../../de/de7/TruthValue_8java_source.html#l00069">TruthValue.java:69</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="../../dir_ed82ebcd34e530b246c6fd9032262140.html">aruntime</a></li><li class="navelem"><a class="el" href="../../dir_19496ddff8e6c0f2b6654287ecb1a472.html">src</a></li><li class="navelem"><a class="el" href="../../dir_db9c5934f797909f7296c2c2017f7fc9.html">main</a></li><li class="navelem"><a class="el" href="../../dir_6d74390eb6d6287951075e525bcb9bed.html">java</a></li><li class="navelem"><a class="el" href="../../dir_51a24984472456d47100350cd31f9a7c.html">nars</a></li><li class="navelem"><a class="el" href="../../dir_ee323373cf7c53e5489dea03632cbb1d.html">inference</a></li><li class="navelem"><a class="el" href="../../df/d29/TruthFunctions_8java.html">TruthFunctions.java</a></li>
    <li class="footer">Generated on Sun Jan 10 2016 18:03:58 for opennars by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.9.1 </li>
  </ul>
</div>
</body>
</html>
